import React, {Component} from 'react';
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import './styles/image.less'

/**
 * 图片
 */
class Image extends Component {

    render() {
        let {
            className, src, id
        } = this.props
        className = classNames(
            {
                [`${id}`]: !!id
            }
        )
        return (
            <img src={src} className={className} id={id}/>
        )
    }
}

Image.defaultProps = {}
Image.propTypes = {
    id: PropTypes.string,
    src: PropTypes.string
}
export default Image